package com.whj.servicemap.controller;

/**
 * @Auther: wanghaijun
 * @Date: 2023/1/20 - 01 - 20 - 11:33 
 * @Description: com.whj.servicemap.controller
 */

import com.whj.internalcommon.dto.ResponseResult;
import com.whj.servicemap.service.TrackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 生成轨迹id trid
 */
@RestController
@RequestMapping("/track")
public class TrackController {

    @Autowired
    private TrackService trackService;
    /**
     * 根据 tid 生成 trid
     * @param tid
     * @return
     */
    @PostMapping("/add/{tid}")
    public ResponseResult addTrack(@PathVariable("tid") String tid){
        return trackService.addTrack(tid);
    }
}
